/**
    @project {
        "templateId": "org.helgoboss.custom",
        "version": "0.1-SNAPSHOT",
        "dependencies": [
            "org.scala-lang:scala-library:2.9.0-1",
            "org.helgoboss:user-logger:0.1-SNAPSHOT",
            "org.helgoboss:osgi-additions:0.1-SNAPSHOT"
        ]
    }
*/

package org.helgoboss.user_logger_ref_impl

import org.helgoboss.osgi_additions._
import org.helgoboss.user_logger.UseUserLogger
import java.io.PrintStream

class Activator extends OsgiProvider {
    whenBundleActive {
        new UseUserLogger {
            def apply[R](f: (PrintStream) => R) = {
                val printStream = System.out
                f(printStream)
            }
        }.providesService[UseUserLogger]
    }
}